import request from '@/utils/request'

// 查询员工档案列表
export function listEmployee(query) {
  return request({
    url: '/system/employee/page',
    method: 'get',
    params: query
  })
}

// 查询部门下拉树结构
export function treeselect(query) {
  return request({
    url: '/system/dept/treeselect',
    method: 'get',
    params: query
  })
}

// 岗位列表
export function listJob() {
  return request({
    url: '/system/post/optionselect',
    method: 'get'
  })
}

// 新增员工档案
export function addEmployee(data) {
  return request({
    url: '/system/employee/add',
    method: 'post',
    data: data
  })
}

// 修改员工档案
export function updateEmployee(data) {
  return request({
    url: '/system/employee/update',
    method: 'post',
    data: data
  })
}

// 设置入司情况
export function setCompany(data) {
  return request({
    url: '/system/company/set',
    method: 'post',
    data: data
  })
}

// 删除员工档案
export function delDept(employeeIds) {
  return request({
    url: '/system/employee/delete/' + employeeIds,
    method: 'post'
  })
}

// 审核
export function employeeCheck(data) {
  return request({
    url: '/system/employee/check',
    method: 'post',
    data: data
  })
}

// 员工档案详情
export function getInfo(employeeId) {
  return request({
    url: '/system/employee/' + employeeId,
    method: 'get'
  })
}

// 学习经历
export function studyList(query) {
  return request({
    url: '/system/study/list',
    method: 'get',
    params: query
  })
}

// 新增学习经历
export function addStudy(data) {
  return request({
    url: '/system/study/add',
    method: 'post',
    data: data
  })
}

// 修改学习经历
export function updateStudy(data) {
  return request({
    url: '/system/study/update',
    method: 'post',
    data: data
  })
}

// 删除学习经历
export function delStudy(ids) {
  return request({
    url: '/system/study/delete/' + ids,
    method: 'post'
  })
}

// 工作经历
export function workList(query) {
  return request({
    url: '/system/work/list',
    method: 'get',
    params: query
  })
}

// 新增工作经历
export function addWork(data) {
  return request({
    url: '/system/work/add',
    method: 'post',
    data: data
  })
}

// 修改工作经历
export function updateWork(data) {
  return request({
    url: '/system/work/update',
    method: 'post',
    data: data
  })
}

// 删除工作经历
export function delWork(ids) {
  return request({
    url: '/system/work/delete/' + ids,
    method: 'post'
  })
}

// 家庭关系
export function familyList(query) {
  return request({
    url: '/system/family/list',
    method: 'get',
    params: query
  })
}

// 新增家庭关系
export function addFamily(data) {
  return request({
    url: '/system/family/add',
    method: 'post',
    data: data
  })
}

// 修改家庭关系
export function updateFamily(data) {
  return request({
    url: '/system/family/update',
    method: 'post',
    data: data
  })
}

// 删除家庭关系
export function delFamily(ids) {
  return request({
    url: '/system/family/delete/' + ids,
    method: 'post'
  })
}

// 奖惩信息
export function rewardList(query) {
  return request({
    url: '/system/reward/list',
    method: 'get',
    params: query
  })
}

// 新增奖惩信息
export function addReward(data) {
  return request({
    url: '/system/reward/add',
    method: 'post',
    data: data
  })
}

// 修改奖惩信息
export function updateReward(data) {
  return request({
    url: '/system/reward/update',
    method: 'post',
    data: data
  })
}

// 删除奖惩信息
export function delReward(ids) {
  return request({
    url: '/system/reward/delete/' + ids,
    method: 'post'
  })
}

// 合同信息
export function contractList(query) {
  return request({
    url: '/system/contract/list',
    method: 'get',
    params: query
  })
}

// 新增合同信息
export function addContract(data) {
  return request({
    url: '/system/contract/add',
    method: 'post',
    data: data
  })
}

// 修改合同信息
export function updateContract(data) {
  return request({
    url: '/system/contract/update',
    method: 'post',
    data: data
  })
}

// 删除合同信息
export function delContract(ids) {
  return request({
    url: '/system/contract/delete/' + ids,
    method: 'post'
  })
}
// 取得证书
export function certificateList(query) {
  return request({
    url: '/system/certificate/list',
    method: 'get',
    params: query
  })
}

// 新增取得证书
export function addCertificate(data) {
  return request({
    url: '/system/certificate/add',
    method: 'post',
    data: data
  })
}

// 修改取得证书
export function updateCertificate(data) {
  return request({
    url: '/system/certificate/update',
    method: 'post',
    data: data
  })
}
// 删除取得证书
export function delCertificate(ids) {
  return request({
    url: '/system/certificate/' + ids,
    method: 'post'
  })
}

// 文档资料
export function documentList(query) {
  return request({
    url: '/system/document/list',
    method: 'get',
    params: query
  })
}

// 新增文档资料
export function addDocument(data) {
  return request({
    url: '/system/document/add',
    method: 'post',
    data: data
  })
}

// 修改文档资料
export function updateDocument(data) {
  return request({
    url: '/system/document/update',
    method: 'post',
    data: data
  })
}

// 删除文档资料
export function delDocument(ids) {
  return request({
    url: '/system/document/delete/' + ids,
    method: 'post'
  })
}

// 文档资料
export function cityList(query) {
  return request({
    url: '/system/city/list',
    method: 'get',
    params: query
  })
}
//获取员工档案附件信息
export function getEmployeeFiles(query) {
  return request({
    url: '/system/document/list',
    method: 'get',
    params: query
  })
}
//附件批量下载
export function getEmployeeFilesBatch(data) {
  return request({
    url: '/system/document/files/download/batch',
    method: 'post',
    responseType: 'blob',
    data: data
  })
}
//操作日志信息列表
export function getOperaList(data) {
  return request({
    url: '/system/Opera/list',
    method: 'post',
    data: data
  })
}

// 查询人事档案导出记录列表
export function getExportList(params) {
  return request({
    url: '/system/exportFile/list',
    method: 'get',
    params
  })
}

// 档案导出
export function exportEmployee(data) {
  return request({
    method: 'post',
    url: '/system/employee/export',
    data
  })
}

// 设置分类、职称、职类、vpn
export function setEmployeeInfo(data) {
  return request({
    method: 'post',
    url: '/system/employee/set',
    data
  })
}
